package cn.ac.siom.query.dao.impl;

import cn.ac.siom.query.dao.IaccessDAO;
import cn.ac.siom.query.vo.Accessinfo;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.sql.SQLException;
import java.util.List;
import java.util.Set;

@Repository
public class AccessDAOImpl extends SqlSessionDaoSupport implements IaccessDAO {
    @Autowired
    public AccessDAOImpl(SqlSessionFactory sqlSessionFactory){
        super.setSqlSessionFactory(sqlSessionFactory);
    }


    @Override
    public boolean insertOne(Accessinfo accessinfo) throws SQLException {
        return super.getSqlSession().insert("AccessNS.insertOne",accessinfo)>0;
    }

    @Override
    public boolean doCreate(Accessinfo vo) throws SQLException {
        return false;
    }

    @Override
    public boolean doUpdate(Accessinfo vo) throws SQLException {
        return false;
    }

    @Override
    public boolean doRemove(Set<?> ids) throws SQLException {
        return false;
    }

    @Override
    public Accessinfo findById(Integer id) throws SQLException {
        return null;
    }

    @Override
    public List<Accessinfo> findAll() throws SQLException {
        return null;
    }

    @Override
    public List<Accessinfo> findAllBySplit(String column, String keyWord, Integer currentPage, Integer lineSize) throws SQLException {
        return null;
    }
}
